home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6753 < prev    next >
Encoding:
Text File  |  1996-08-05  |  601 b   |  24 lines

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Please help me debug this.
  5. Date: 14 Feb 1996 21:07:09 GMT
  6. Organization: OpenVision
  7. Message-ID: <4ftitt$h7@spanky.pls.ov.com>
  8. References: <4fq73t$inl@news-e1a.megaweb.com>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12.  
  13. The problem is that you are using fgets to get your strings from
  14. your filter file.  fgets includes the newline in the data copied
  15. from the file.  To correct this, try:
  16.  
  17. char *tp;
  18.  
  19. if ((tp = strchr(fbuff, '\n')) != NULL)
  20.      *tp = '\0';
  21.  
  22.             Fletcher.Glenn@ov.com
  23.  
  24.